import entity.Pet;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.PetService;

public class AopTest {
    @Test
    public void testAop(){
        ApplicationContext context =
                new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        Pet pet = (Pet) context.getBean("pet");
        PetService petService = (PetService) context.getBean("petService");
        petService.save(pet);
        petService.modify(pet);
        petService.del(1);
    }
}
